﻿using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement;

namespace TissotWeb.GoogleMaps.Models {
    public class GoogleMapPart : ContentPart {

        [Required]
        public double Latitude {
            get { return this.Retrieve(l=>l.Latitude); }
            set { this.Store(x => x.Latitude, value);  }
        }

        [Required]
        public double Longitude {
            get { return this.Retrieve(l=>l.Longitude); }
            set { this.Store(x => x.Longitude, value); }
        }
    }

    public class GoogleMapPartViewModel  {
        public string ApiKey { get; set; }
        public double Latitude { get; set; }
        public double Longitude { get; set; }
    }
}
